import axios from 'axios'

const Get=(url)=>{
    return (target,key,descriptor)=>{
        const fn=descriptor.value;
         axios.get(url).then((res)=>{
            fn(res,{
                status:200,
                success:true
            })
         }).catch((err)=>{
            fn(err,{
                status:500,
                success:false
            })
         })
    }
}

class Controller {
  constructor() {}
  @Get('http://api.apiopen.top/api/getHaoKanVideo?page=0&size=10')
  getList(res,status){
 console.log(res,status);
  }
}